package org.myfram.flink.flinkonjar.common.connector.hbase;

import org.apache.flink.connector.hbase.sink.HBaseMutationConverter;
import org.apache.hadoop.hbase.client.Mutation;

public class HBaseTableMutationConverter<T> implements HBaseMutationConverter<T> {
    
    private final HBaseTableDefinition<T> tableDefinition;
    
    public HBaseTableMutationConverter(HBaseTableDefinition<T> tableDefinition) {
        this.tableDefinition = tableDefinition;
    }

    @Override
    public void open() {

    }

    @Override
    public Mutation convertToMutation(T value) {
        return tableDefinition.convertToMutation(value);
    }

}